<?php
/**
 * User: WL
 * Time: 12-10-13 - 上午9:14
 * File: list.inc.php
 * Project For ixdcw.com
 */
/**
 * 2013-4-1 Sameal add order by cityid an group level
 */
defined('IN_IXDCW') or exit('Access Denied');
require DT_CORE.'/buyhelp/common.inc.php';
$navname ='new';
$order= 'edittime desc';
if (!empty($cartypeid)) {
	$carids = AutoCategoryModule::getCarbylevel($cartypeid);
	$car_order .= "(case when arcid in ($carids) then 1 else 2 end),edittime desc";
}
//幻灯图片
$picList = $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}information where status=3 and catid in (2562,2563,2564) and level=2 and cartypeid = {$cartypeid} order by {$order} limit 8");

//top
$topList = $db->getAll("select title,thumb,itemid,addtime from {$db->getPre()}information where status=3 and catid in (2562,2563,2564) and level!=2 and cartypeid = {$cartypeid} order by {$order} limit 10");
$top_one = array_shift($topList);
//新车上市
$carList = $db->getAll("
		select a.arid,a.name,a.parentid,r.car_thumb,r.pricerange,r.levelrange,r.gearboxrange
		from {$db->getPre()}auto_category a,{$db->getPre()}auto_rank_car r
        where a.arid=r.arid and a.level=2 and r.car_thumb!='' and r.pricerange !='' order by a.edittime desc limit 4"
);
//新车视频
$videoList = $db->getAll("select itemid,thumb,title from {$db->getPre()}video where catid =3274 order by edittime desc limit 5");
//试驾
$driveList = $db->getAll("select title,itemid,thumb from {$db->getPre()}guide where status=3 and thumb!='' and catid  in (3592,5147,5148)
		and thumb!='' order by {$car_order} limit 8");

$MOD['name']='买车助手_新车';
$seo_file = 'index';
include DT_INC.'/seo.inc.php';
include template('new', 'buyhelp');

